"use strict";

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

!function (e, t) {
  "object" == (typeof exports === "undefined" ? "undefined" : _typeof(exports)) && "object" == (typeof module === "undefined" ? "undefined" : _typeof(module)) ? module.exports = t() : "function" == typeof define && define.amd ? define([], t) : "object" == (typeof exports === "undefined" ? "undefined" : _typeof(exports)) ? exports.VuejsPaginate = t() : e.VuejsPaginate = t();
}(undefined, function () {
  return function (e) {
    function t(s) {
      if (n[s]) return n[s].exports;var a = n[s] = { exports: {}, id: s, loaded: !1 };return e[s].call(a.exports, a, a.exports, t), a.loaded = !0, a.exports;
    }var n = {};return t.m = e, t.c = n, t.p = "", t(0);
  }([function (e, t, n) {
    "use strict";
    function s(e) {
      return e && e.__esModule ? e : { default: e };
    }var a = n(1),
        i = s(a);e.exports = i.default;
  }, function (e, t, n) {
    n(2);var s = n(6)(n(7), n(8), "data-v-82963a40", null);e.exports = s.exports;
  }, function (e, t, n) {
    var s = n(3);"string" == typeof s && (s = [[e.id, s, ""]]);n(5)(s, {});s.locals && (e.exports = s.locals);
  }, function (e, t, n) {
    t = e.exports = n(4)(), t.push([e.id, "a[data-v-82963a40]{cursor:pointer}", ""]);
  }, function (e, t) {
    e.exports = function () {
      var e = [];return e.toString = function () {
        for (var e = [], t = 0; t < this.length; t++) {
          var n = this[t];n[2] ? e.push("@media " + n[2] + "{" + n[1] + "}") : e.push(n[1]);
        }return e.join("");
      }, e.i = function (t, n) {
        "string" == typeof t && (t = [[null, t, ""]]);for (var s = {}, a = 0; a < this.length; a++) {
          var i = this[a][0];"number" == typeof i && (s[i] = !0);
        }for (a = 0; a < t.length; a++) {
          var r = t[a];"number" == typeof r[0] && s[r[0]] || (n && !r[2] ? r[2] = n : n && (r[2] = "(" + r[2] + ") and (" + n + ")"), e.push(r));
        }
      }, e;
    };
  }, function (e, t, n) {
    function s(e, t) {
      for (var n = 0; n < e.length; n++) {
        var s = e[n],
            a = d[s.id];if (a) {
          a.refs++;for (var i = 0; i < a.parts.length; i++) {
            a.parts[i](s.parts[i]);
          }for (; i < s.parts.length; i++) {
            a.parts.push(o(s.parts[i], t));
          }
        } else {
          for (var r = [], i = 0; i < s.parts.length; i++) {
            r.push(o(s.parts[i], t));
          }d[s.id] = { id: s.id, refs: 1, parts: r };
        }
      }
    }function a(e) {
      for (var t = [], n = {}, s = 0; s < e.length; s++) {
        var a = e[s],
            i = a[0],
            r = a[1],
            l = a[2],
            o = a[3],
            c = { css: r, media: l, sourceMap: o };n[i] ? n[i].parts.push(c) : t.push(n[i] = { id: i, parts: [c] });
      }return t;
    }function i(e, t) {
      var n = g(),
          s = C[C.length - 1];if ("top" === e.insertAt) s ? s.nextSibling ? n.insertBefore(t, s.nextSibling) : n.appendChild(t) : n.insertBefore(t, n.firstChild), C.push(t);else {
        if ("bottom" !== e.insertAt) throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");n.appendChild(t);
      }
    }function r(e) {
      e.parentNode.removeChild(e);var t = C.indexOf(e);t >= 0 && C.splice(t, 1);
    }function l(e) {
      var t = document.createElement("style");return t.type = "text/css", i(e, t), t;
    }function o(e, t) {
      var n, s, a;if (t.singleton) {
        var i = h++;n = v || (v = l(t)), s = c.bind(null, n, i, !1), a = c.bind(null, n, i, !0);
      } else n = l(t), s = u.bind(null, n), a = function a() {
        r(n);
      };return s(e), function (t) {
        if (t) {
          if (t.css === e.css && t.media === e.media && t.sourceMap === e.sourceMap) return;s(e = t);
        } else a();
      };
    }function c(e, t, n, s) {
      var a = n ? "" : s.css;if (e.styleSheet) e.styleSheet.cssText = b(t, a);else {
        var i = document.createTextNode(a),
            r = e.childNodes;r[t] && e.removeChild(r[t]), r.length ? e.insertBefore(i, r[t]) : e.appendChild(i);
      }
    }function u(e, t) {
      var n = t.css,
          s = t.media,
          a = t.sourceMap;if (s && e.setAttribute("media", s), a && (n += "\n/*# sourceURL=" + a.sources[0] + " */", n += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(a)))) + " */"), e.styleSheet) e.styleSheet.cssText = n;else {
        for (; e.firstChild;) {
          e.removeChild(e.firstChild);
        }e.appendChild(document.createTextNode(n));
      }
    }var d = {},
        f = function f(e) {
      var t;return function () {
        return "undefined" == typeof t && (t = e.apply(this, arguments)), t;
      };
    },
        p = f(function () {
      return (/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())
      );
    }),
        g = f(function () {
      return document.head || document.getElementsByTagName("head")[0];
    }),
        v = null,
        h = 0,
        C = [];e.exports = function (e, t) {
      t = t || {}, "undefined" == typeof t.singleton && (t.singleton = p()), "undefined" == typeof t.insertAt && (t.insertAt = "bottom");var n = a(e);return s(n, t), function (e) {
        for (var i = [], r = 0; r < n.length; r++) {
          var l = n[r],
              o = d[l.id];o.refs--, i.push(o);
        }if (e) {
          var c = a(e);s(c, t);
        }for (var r = 0; r < i.length; r++) {
          var o = i[r];if (0 === o.refs) {
            for (var u = 0; u < o.parts.length; u++) {
              o.parts[u]();
            }delete d[o.id];
          }
        }
      };
    };var b = function () {
      var e = [];return function (t, n) {
        return e[t] = n, e.filter(Boolean).join("\n");
      };
    }();
  }, function (e, t) {
    e.exports = function (e, t, n, s) {
      var a,
          i = e = e || {},
          r = _typeof(e.default);"object" !== r && "function" !== r || (a = e, i = e.default);var l = "function" == typeof i ? i.options : i;if (t && (l.render = t.render, l.staticRenderFns = t.staticRenderFns), n && (l._scopeId = n), s) {
        var o = l.computed || (l.computed = {});Object.keys(s).forEach(function (e) {
          var t = s[e];o[e] = function () {
            return t;
          };
        });
      }return { esModule: a, exports: i, options: l };
    };
  }, function (e, t) {
    "use strict";
    Object.defineProperty(t, "__esModule", { value: !0 }), t.default = { props: { pageCount: { type: Number, required: !0 }, initialPage: { type: Number, default: 0 }, forcePage: { type: Number }, clickHandler: { type: Function, default: function _default() {} }, pageRange: { type: Number, default: 3 }, marginPages: { type: Number, default: 1 }, prevText: { type: String, default: "Prev" }, nextText: { type: String, default: "Next" }, breakViewText: { type: String, default: "…" }, containerClass: { type: String }, pageClass: { type: String }, pageLinkClass: { type: String }, prevClass: { type: String }, prevLinkClass: { type: String }, nextClass: { type: String }, nextLinkClass: { type: String }, breakViewClass: { type: String }, breakViewLinkClass: { type: String }, activeClass: { type: String, default: "active" }, disabledClass: { type: String, default: "disabled" }, noLiSurround: { type: Boolean, default: !1 }, firstLastButton: { type: Boolean, default: !1 }, firstButtonText: { type: String, default: "First" }, lastButtonText: { type: String, default: "Last" }, hidePrevNext: { type: Boolean, default: !1 } }, data: function data() {
        return { selected: this.initialPage };
      }, beforeUpdate: function beforeUpdate() {
        void 0 !== this.forcePage && this.forcePage !== this.selected && (this.selected = this.forcePage);
      }, computed: { pages: function pages() {
          var e = this,
              t = {};if (this.pageCount <= this.pageRange) for (var n = 0; n < this.pageCount; n++) {
            var s = { index: n, content: n + 1, selected: n === this.selected };t[n] = s;
          } else {
            for (var a = Math.floor(this.pageRange / 2), i = function i(n) {
              var s = { index: n, content: n + 1, selected: n === e.selected };t[n] = s;
            }, r = function r(e) {
              var n = { disabled: !0, breakView: !0 };t[e] = n;
            }, l = 0; l < this.marginPages; l++) {
              i(l);
            }var o = 0;this.selected - a > 0 && (o = this.selected - a);var c = o + this.pageRange - 1;c >= this.pageCount && (c = this.pageCount - 1, o = c - this.pageRange + 1);for (var u = o; u <= c && u <= this.pageCount - 1; u++) {
              i(u);
            }o > this.marginPages && r(o - 1), c + 1 < this.pageCount - this.marginPages && r(c + 1);for (var d = this.pageCount - 1; d >= this.pageCount - this.marginPages; d--) {
              i(d);
            }
          }return t;
        } }, methods: { handlePageSelected: function handlePageSelected(e) {
          this.selected !== e && (this.selected = e, this.clickHandler(this.selected + 1));
        }, prevPage: function prevPage() {
          this.selected <= 0 || (this.selected--, this.clickHandler(this.selected + 1));
        }, nextPage: function nextPage() {
          this.selected >= this.pageCount - 1 || (this.selected++, this.clickHandler(this.selected + 1));
        }, firstPageSelected: function firstPageSelected() {
          return 0 === this.selected;
        }, lastPageSelected: function lastPageSelected() {
          return this.selected === this.pageCount - 1 || 0 === this.pageCount;
        }, selectFirstPage: function selectFirstPage() {
          this.selected = 0, this.clickHandler(this.selected);
        }, selectLastPage: function selectLastPage() {
          this.selected = this.pageCount - 1, this.clickHandler(this.selected);
        } } };
  }, function (e, t) {
    e.exports = { render: function render() {
        var e = this,
            t = e.$createElement,
            n = e._self._c || t;return e.noLiSurround ? n("div", { class: e.containerClass }, [e.firstLastButton ? n("a", { class: [e.pageLinkClass, e.firstPageSelected() ? e.disabledClass : ""], attrs: { tabindex: "0" }, on: { click: function click(t) {
              e.selectFirstPage();
            }, keyup: function keyup(t) {
              return "button" in t || !e._k(t.keyCode, "enter", 13) ? void e.selectFirstPage() : null;
            } } }, [e._v(e._s(e.firstButtonText))]) : e._e(), e._v(" "), e.firstPageSelected() && e.hidePrevNext ? e._e() : n("a", { class: [e.prevLinkClass, e.firstPageSelected() ? e.disabledClass : ""], attrs: { tabindex: "0" }, on: { click: function click(t) {
              e.prevPage();
            }, keyup: function keyup(t) {
              return "button" in t || !e._k(t.keyCode, "enter", 13) ? void e.prevPage() : null;
            } } }, [e._t("prevContent", [e._v(e._s(e.prevText))])], 2), e._v(" "), e._l(e.pages, function (t) {
          return [t.breakView ? n("a", { class: [e.pageLinkClass, e.breakViewLinkClass, t.disabled ? e.disabledClass : ""], attrs: { tabindex: "0" } }, [e._t("breakViewContent", [e._v(e._s(e.breakViewText))])], 2) : t.disabled ? n("a", { class: [e.pageLinkClass, t.selected ? e.activeClass : "", e.disabledClass], attrs: { tabindex: "0" } }, [e._v(e._s(t.content))]) : n("a", { class: [e.pageLinkClass, t.selected ? e.activeClass : ""], attrs: { tabindex: "0" }, on: { click: function click(n) {
                e.handlePageSelected(t.index);
              }, keyup: function keyup(n) {
                return "button" in n || !e._k(n.keyCode, "enter", 13) ? void e.handlePageSelected(t.index) : null;
              } } }, [e._v(e._s(t.content))])];
        }), e._v(" "), e.lastPageSelected() && e.hidePrevNext ? e._e() : n("a", { class: [e.nextLinkClass, e.lastPageSelected() ? e.disabledClass : ""], attrs: { tabindex: "0" }, on: { click: function click(t) {
              e.nextPage();
            }, keyup: function keyup(t) {
              return "button" in t || !e._k(t.keyCode, "enter", 13) ? void e.nextPage() : null;
            } } }, [e._t("nextContent", [e._v(e._s(e.nextText))])], 2), e._v(" "), e.firstLastButton ? n("a", { class: [e.pageLinkClass, e.lastPageSelected() ? e.disabledClass : ""], attrs: { tabindex: "0" }, on: { click: function click(t) {
              e.selectLastPage();
            }, keyup: function keyup(t) {
              return "button" in t || !e._k(t.keyCode, "enter", 13) ? void e.selectLastPage() : null;
            } } }, [e._v(e._s(e.lastButtonText))]) : e._e()], 2) : n("ul", { class: e.containerClass }, [e.firstLastButton ? n("li", { class: [e.pageClass, e.firstPageSelected() ? e.disabledClass : ""] }, [n("a", { class: e.pageLinkClass, on: { click: function click(t) {
              e.selectFirstPage();
            }, keyup: function keyup(t) {
              return "button" in t || !e._k(t.keyCode, "enter", 13) ? void e.selectFirstPage() : null;
            } } }, [e._v(e._s(e.firstButtonText))])]) : e._e(), e._v(" "), e.firstPageSelected() && e.hidePrevNext ? e._e() : n("li", { class: [e.prevClass, e.firstPageSelected() ? e.disabledClass : ""] }, [n("a", { class: e.prevLinkClass, attrs: { tabindex: "0" }, on: { click: function click(t) {
              e.prevPage();
            }, keyup: function keyup(t) {
              return "button" in t || !e._k(t.keyCode, "enter", 13) ? void e.prevPage() : null;
            } } }, [e._t("prevContent", [e._v(e._s(e.prevText))])], 2)]), e._v(" "), e._l(e.pages, function (t) {
          return n("li", { class: [e.pageClass, t.selected ? e.activeClass : "", t.disabled ? e.disabledClass : "", t.breakView ? e.breakViewClass : ""] }, [t.breakView ? n("a", { class: [e.pageLinkClass, e.breakViewLinkClass], attrs: { tabindex: "0" } }, [e._t("breakViewContent", [e._v(e._s(e.breakViewText))])], 2) : t.disabled ? n("a", { class: e.pageLinkClass, attrs: { tabindex: "0" } }, [e._v(e._s(t.content))]) : n("a", { class: e.pageLinkClass, attrs: { tabindex: "0" }, on: { click: function click(n) {
                e.handlePageSelected(t.index);
              }, keyup: function keyup(n) {
                return "button" in n || !e._k(n.keyCode, "enter", 13) ? void e.handlePageSelected(t.index) : null;
              } } }, [e._v(e._s(t.content))])]);
        }), e._v(" "), e.lastPageSelected() && e.hidePrevNext ? e._e() : n("li", { class: [e.nextClass, e.lastPageSelected() ? e.disabledClass : ""] }, [n("a", { class: e.nextLinkClass, attrs: { tabindex: "0" }, on: { click: function click(t) {
              e.nextPage();
            }, keyup: function keyup(t) {
              return "button" in t || !e._k(t.keyCode, "enter", 13) ? void e.nextPage() : null;
            } } }, [e._t("nextContent", [e._v(e._s(e.nextText))])], 2)]), e._v(" "), e.firstLastButton ? n("li", { class: [e.pageClass, e.lastPageSelected() ? e.disabledClass : ""] }, [n("a", { class: e.pageLinkClass, on: { click: function click(t) {
              e.selectLastPage();
            }, keyup: function keyup(t) {
              return "button" in t || !e._k(t.keyCode, "enter", 13) ? void e.selectLastPage() : null;
            } } }, [e._v(e._s(e.lastButtonText))])]) : e._e()], 2);
      }, staticRenderFns: [] };
  }]);
});